<oc-menu>
	<li>文件(F)
		<ul>
			<li><a ng-click="newCase()">新建(N)</a></li>
			<li><a oc-dialog-open="{name:'case/open',data:{fn:openCase}}">打开(O)</a></li><hr/>
			<li ng-show="case.caseId"><a ng-click="updateCase()">保存(S)</a></li>
			<li ng-hide="case.caseId"><a ng-click="createCase()">保存</a></li>
			<li><a oc-dialog-open="{name:'object/editor'}">配置项目变量</a></li>
			<li><a oc-dialog-close>关闭探针(X)</a></li>
		</ul>
	</li>
	<li>帮助(H)
		<ul>
			<li><a href="http://www.lemonce.net" target="_blank">Lemonce测试工具</a></li>
			<li><a href="http://www.lemonce.com" target="_blank">测试管理服务</a></li>
			<li><a oc-dialog-open="{name:'help/lemonCase'}">LemonCase语言</a></li><hr/>
			<li><a oc-dialog-open="{name:'help/about'}">关于LemonceProbe</a></li>
		</ul>
	</li>
</oc-menu>
<nav class="oc-toolbar" style="border-bottom:1px solid #aaa;top:1rem">
	<button class="new ico" ng-click="newCase()" title="新建"></button>
	<button class="open ico"
		oc-dialog-open="{name:'case/open',data:{fn:openCase}}"
		title="打开"
		ng-show="bootSetup.mode==='full'"></button>
	<button class="open ico" type="file"
		ng-show="bootSetup.mode==='trial'"
		ngf-select="uploadCode($file)"
		title="打开">
	</button>
	<button class="save ico" ng-click="preSaveCase(updateCase)"
		ng-show="case.caseId&&bootSetup.mode==='full'"
		title="保存"></button>
	<button class="save ico" ng-click="preSaveCase(createCase)"
		ng-hide="case.caseId||bootSetup.mode==='trial'"
		title="保存"></button>
	<button class="save ico" ng-click="preSaveCase(downloadCode)"
		ng-show="bootSetup.mode==='trial'"
		title="保存"></button>
	<hr/><button class="back ico" ng-click="history.go(-1)"></button>
	<button class="next ico" ng-click="history.go(1)"></button>
	<oc-address oc-address-iframe="LCF" style="width:20rem"></oc-address><hr/>

	<button class="play ico" ng-click="buildAndPlay()"
		ng-show="p.status=='idle'"
		title="构建&启动"></button>
	<button class="play ico" ng-click="resume()"
		ng-show="p.status=='wait'"
		title="继续"></button>
	<button class="pause ico" ng-click="pause()"
		ng-show="p.status=='run'"
		ng-disabled="caseInstance.$$currentLoop<1"
		title="暂停"></button>
	<button class="stop ico" ng-click="stop()"
		ng-disabled="p.status=='idle'"
		title="终止"></button><hr/>
	<label class="icon width"></label>
	<input type="text" style="width:4em"
		ng-model="screen.width"
		ng-model-options="{getterSetter:true,updateOn:'blur'}" /><label>px</label>
	<label class="icon height"></label>
	<input type="text" style="width:4em"
		ng-model="screen.height"
		ng-model-options="{getterSetter:true,updateOn:'blur'}" /><label>px</label>
	<button class="full-screen ico" ng-click="fullScreen()" title="平铺"
		ng-class="{active:LCF.style.height=='100%'&&LCF.style.width=='100%'}"></button>
</nav>

<div class="grid" id="projectGrid"
	ng-style="{'right':isFixed?'20rem':0}"
    style="top:2.5rem;right:20rem;bottom:0;left:0">
	<nav class="oc-toolbar" id="css-path-tool"
		ng-show="cssPathEditor.isActive"
		style="position:absolute;top:0;width:1200px;background:#f0f0f0;z-index:1;
			border-radius:0 0 5px 0;border:solid #999;border-width:0 1px 1px 0">
		<button class="ico capture" title="捕获" ng-click="cssPathEditor.capture()"></button>
		<input style="width:1090px" ng-model="cssPathEditor.path"
			ng-keydown="$event.keyCode===13?cssPathEditor.insert():null"/>
		<label style="margin-left:-1.5rem;color:#999">{{cssPathEditor.length}}</label>
		<button class="ico close right" title="关闭"
			ng-click="cssPathEditor.isActive=!cssPathEditor.isActive"></button>
		<button class="ico insertCase right" title="插入到用例"
			ng-click="cssPathEditor.insert()"></button>
		<button class="ico htmlSearch right" title="查看HTML"></button>
	</nav>
</div>

<div class="grid"
	 style="top:2.5rem;bottom:0;right:0;width:20rem;background-color:#f2f2f2;
		border-left:1px solid #aaa;box-sizing: border-box;">
	<nav class="oc-toolbar" style="top:0;width:100%">
		<button ng-click="parse()" class="ico parsing" title="分析"></button><hr/>
		<button ng-click="undo()" class="ico undo" title="撤销(Ctrl+z)"></button>
		<button ng-click="redo()" class="ico redo" title="重复(Ctrl+r)"></button><hr/>
		<button ng-click="capture()" class="ico editsearch"
			title="插入选择器"></button>
		<button ng-click="insertUrl()" class="ico terminal"
			title="插入当前地址"></button>
		<button ng-click="insertField()" class="ico object"
			title="插入字段"
			ng-disabled="!dictionary.field"></button>
		<button class="delDictionary ico" ng-click="case.dictionaryId=0"
			ng-show="dictionary"></button>
		<button class="ico right search" title="编辑选择器"
			ng-class="{active:cssPathEditor.isActive}"
			ng-click="cssPathEditor.isActive=!cssPathEditor.isActive"></button>
	</nav>

	<div class="grid"
		style="top:1.5rem;bottom:0;left:0rem;right:0rem;width:auto;height:auto">
		<!--coding-->
		<div id="code" style="top:0rem;height:auto;bottom:12.5rem;left:0;right:0;
			border:solid #ccc;border-width:1px 0">
			<textarea ui-codemirror="editorOptions" ng-model="case.code"
				ui-refresh="caseCodeMirrorRefresh"></textarea>
		</div>
		<div id="comment">
			<p ng-style="{color:case.reviewed?'#116644':'#AA1111'}">
				<input ng-model="case.reviewed" type="checkbox" style="margin-left:0.3rem" />
				<span style="font-weight:bold;padding-left:.3rem">名称：</span><input
					ng-model="case.name"
					style="background:transparent;width:22em" />
				<span class="right"
					style="font-weight:bold;color:#000;padding-right:.5rem;">属性</span>
			</p>
			<textarea ng-model="case.comment"></textarea>
		</div>
		<div id="tags" style="bottom:0;left:0;right:0;height:5.5rem;background:white">
			<div style="overflow:auto; height: 4rem">
				<span class="tag-container" ng-repeat="tag in case.tags track by $index">
					{{tag}}
					<span
						ng-click="case.tags.splice($index, 1)"
						style="cursor:pointer">&times;</span>
				</span>
			</div>
			<nav class="oc-toolbar"
				style="position:absolute;border-top: 1px solid #ccc;background:white">
				<input type="text" placeholder="请输入一个标签"
					ng-model="newTagText">
				<button class="ico add-tag"
					ng-disabled="!newTagText||newTagText.length==0"
					ng-click="case.tags.push(newTagText);newTagText=''"></button>
			</nav>
		</div>
		<!--<pre style="position:absolute;height:3.5rem;left:0;right:0;bottom:0;
			padding:.5rem;overflow:auto">{{parseConsole?parseConsole:'分析成功，可以运行'}}</pre>-->
	</div><!-- //Source Mode -->

</div>
<a class="ico feedback" target="_blank"
	href="http://git.oschina.net/increase/LemonProbe/issues"
	style="right:.3rem;top:.3rem"></a>
<div ng-show="mask" class="grid"
	style="left:0;right:0;top:2.5rem;bottom:0;background-color:rgba(0,0,0,.05);z-index:4"></div>
